<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>css</title>
    <style>
        div{
            height: 100px;
            width: 100px;
            border: 1px solid #ff0000;
        }
    </style>
    <script src="../../js/jquery.1.8.3.min.js"></script>
    <script>
        $(function () {
            $("#btn1").click(function () {
                $("div").css("background","blue")
            });

            $("#btn2").click(function () {
                $("div").css("background","red");
            });

            $("#btn3").click(function () {
               var color = $("div").css("background");
               console.log(color)
            });

            $("#btn4").click(function () {
                $("div").css({
                    background:'yellow',
                    borderColor:'#24FFF3'
                })
            });
        })
    </script>
</head>
<body>
    <div></div>
    <button id="btn1">变蓝</button>
    <button id="btn2">变红</button>
    <button id="btn3">获取RGB值</button>
    <button id="btn4">变色</button>
</body>
</html>